home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / os2 / mlrxshl.zip / MLRXSHL.INF (.txt) < prev    next >
OS/2 Help File  |  1996-02-22  |  71KB  |  1,276 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. CmdShl User's Guide ΓòÉΓòÉΓòÉ
  3.  
  4.  Warning!  If you're using Object Rexx (the DEVCON 8/9 edition) as your default 
  5.  Rexx, disable the implicit "CD" mode and, most importantly, don't use filename 
  6.  completion.  Theses two features rely on DIRECTORY() and FILESPEC() built-in 
  7.  Rexx functions, which are broken in this version of Object Rexx. 
  8.  
  9.      What's that? 
  10.      Installation 
  11.      Starting CmdShl 
  12.      Editing commands 
  13.      Internal commands 
  14.         -  ALIAS 
  15.         -  DEFine 
  16.         -  QUIT 
  17.         -  RX 
  18.         -  CD 
  19.      Known limitations 
  20.      Related Files 
  21.      National Language Support 
  22.      Profile Support 
  23.      Internal functions 
  24.      Internal variables 
  25.      Editing variables 
  26.  
  27.  
  28. ΓòÉΓòÉΓòÉ 1.1. What's that? ΓòÉΓòÉΓòÉ
  29.  
  30. CmdShl is a command interpreter front-end.  It mimics the CMD.EXE command line 
  31. behavior.  It adds the following features: 
  32.  
  33.    1. You can define the initial insertion/overwriting state. 
  34.    2. The TAB and Shift+TAB keys provide file-name completion. 
  35.    3. An alias support is included. 
  36.    4. You can easily redefine keys assignments via profile. 
  37.    5. The "CD" command accepts both "/" and "\". 
  38.    6. The "CD -" command switches between current and previous directories. 
  39.    7. You can edit lines longer than 255 chars. 
  40.    8. A new "RX" internal command. 
  41.    9. Using the "CD" command is optional if you want to change to another 
  42.       directory (aka "executable" directories). 
  43.   10. With the "DEFine" internal command, you can set a key's value (either a 
  44.       text or a command). 
  45.   11. The "CD" command can use the CDPATH environment variable. 
  46.   12. The "executable" directories feature is optional (enabled by default). 
  47.   13. Optional command name validation (if an unknown command name is entered, 
  48.       it is highlighted). 
  49.  
  50.  Note:  CmdShl can also be used as a front-end for 4OS2, or with any command 
  51.  interpreter which provides a REXX interface. 
  52.  
  53.  
  54. ΓòÉΓòÉΓòÉ 1.2. Installation ΓòÉΓòÉΓòÉ
  55.  
  56. Installing CmdShl is very simple:  just copy CMDSHL.CMD somewhere along your 
  57. PATH, and, if you want to use a profile file, customize PROFILE.SHL and move it 
  58. somewhere along your DPATH.  You can also put REXXVIO.DLL somewhere along your 
  59. LIBPATH. 
  60.  
  61. If you want to use CmdShl whenever you open an OS/2 session, you can add the 
  62. following statement in the "Parameter" field of your OS/2 Windowed (or 
  63. fullscreen) session object: 
  64.  
  65.    /k "cmdshl"
  66.  
  67.  
  68. ΓòÉΓòÉΓòÉ 1.3. Starting CmdShl ΓòÉΓòÉΓòÉ
  69.  
  70. Syntax 
  71.  
  72.    cmdshl [/?] [/I|/O] [/P profile] [/C command|/K command]
  73.  
  74. Parameters 
  75.  
  76.    /?         -  Display a short explanation for CmdShl;
  77.  
  78.    /I         -  Use Insert mode by default (default);
  79.    /O         -  Use Overstrike mode by defaut;
  80.  
  81.    /P profile -  Use profile instead of "profile.shl";
  82.  
  83.    /C cmd     -  Just like the CMD.EXE /C switch;
  84.    /K cmd     -  Just like the CMD.EXE /K switch.
  85.  
  86. Examples 
  87.  
  88.    cmdshl
  89.    cmdshl /c dir
  90.    cmdshl /k alias @myalias
  91.  
  92.  
  93. ΓòÉΓòÉΓòÉ 1.4. Editing Commands ΓòÉΓòÉΓòÉ
  94.  
  95. By default, CmdShl uses CMD.EXE editing commands, that is: 
  96.  
  97.    Home, Left, Right, End
  98.    Up, Down
  99.    F1                               -- command completion
  100.    ESC, Ctrl+Home, Ctrl+End
  101.    Ins                              -- toggle insert mode
  102.    Del, BackSpace
  103.  
  104. It also redefines the Tab and Shift+Tab keys: 
  105.  
  106.    Tab, Shift+Tab                   -- file name completion
  107.  
  108. But you can redefine almost all keys to suit your needs.  As an example, the 
  109. default profile file provides the following additional features: 
  110.  
  111.    Ctrl+A, Ctrl+E, Ctrl+B, Ctrl+F   -- EMACS-like cursor keys
  112.    F8                               -- insert current date
  113.    Shift+F7                         -- show all matching file names
  114.    F2, F5, F7                       -- save, load and rename
  115.                                     -- history list
  116.  
  117.  
  118. ΓòÉΓòÉΓòÉ 1.5. Internal Commands ΓòÉΓòÉΓòÉ
  119.  
  120. CmdShl adds the following "internal" commands: 
  121.  
  122.    ALIAS [LIST|@file|alias=[cmd]]
  123.    DEFine key [value]
  124.    QUIT
  125.    RX cmd
  126.  
  127. And it "enhances" the following underlying shell commands: 
  128.  
  129.    CD
  130.  
  131.  
  132. ΓòÉΓòÉΓòÉ 1.5.1. ALIAS ΓòÉΓòÉΓòÉ
  133.  
  134. The ALIAS command is used to view/define/remove aliases.  Alias names ARE 
  135. case-sensitive.  Recursives aliases are not allowed (but an alias can use 
  136. another alias).  And an alias can use all CmdShl's internal commands. 
  137.  
  138. ALIAS ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇLISTΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  139.                        Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇ@fileΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  140.                        ΓööΓöÇalias=Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
  141.                                ΓööΓöÇvalueΓöÇΓöÿ
  142.  
  143. To view all defined aliases, issue the "ALIAS LIST" command. 
  144.  
  145. To save all defined aliases in a file, redirect the previous command output 
  146. into a file, as in "ALIAS LIST >mylist". 
  147.  
  148. To load an alias list, use "ALIAS @mylist" (where "mylist" is a file containing 
  149. alias definitions). 
  150.  
  151. To remove an existing alias, use an empty definition, as in "ALIAS foo=". 
  152.  
  153. To define a new alias, use "ALIAS alias=def", where "alias" is the alias name, 
  154. and "def" its definition (any valid command).  In addition, you can use the 
  155. "%*" parameter as well as "%n" (where n is the argument number in range 0..9, 0 
  156. being the alias name), which denotes "runtime" parameters.  (If "%n" is 
  157. immediately followed by '*', it means "arg n and all remaining args".)  Here 
  158. are some aliases definitions: 
  159.  
  160.    ALIAS dir=dir %* ^| less
  161.    ALIAS prj=cd \user\alpha\smith\MyProject\Current
  162.    ALIAS makeprj=prj ^& nmake
  163.    ALIAS calc=rx say %*; RC=0
  164.    ALIAS in=cd %1 ^& %2* ^& cd -
  165.  
  166. Notes: 
  167.  
  168. An alias can redefine an existing command, as "dir" in the previous list.  The 
  169. right-hand-side "dir" is the CMD.EXE internal command -- recursive aliases are 
  170. not allowed, and hence this second "dir" cannot be an alias, so it must be 
  171. something else (a CMD.EXE internal command in this very case). 
  172.  
  173. When defining aliases from the command line, you may have to quote special 
  174. symbols (such as '&'  and '|') with a '^' in order to prevent unexpected 
  175. results.  For example, the first (dir), third (makeprj) and last (in) aliases 
  176. require an '^' in front of their '&'s when entered from the command line. 
  177.  
  178.  
  179. ΓòÉΓòÉΓòÉ 1.5.2. DEFine ΓòÉΓòÉΓòÉ
  180.  
  181. The DEFine command is used to [re]define a key.  You can either assign to a key 
  182. an internal action, an immediate command or a static text.  You can also remove 
  183. a key definition (the key will then returns its default value). 
  184.  
  185. DEFine ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇkeyΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  186.                                      ΓööΓöÇΓöÇΓöÇvalueΓöÇΓöÇΓöÇΓöÿ
  187.  
  188. [In this section, if a command name is shown in mixed case, as "DEFine" above, 
  189. it means it can be abbreviated.  That is, you can use either "DEF", "DEFI", 
  190. "DEFIN" or "DEFINE" -- upper-cased letters are required, others are optionals.] 
  191.  
  192. keys names 
  193.  
  194. By default, the following keys-name are defined: 
  195.  
  196.    A-F10, BKSP, CURD, CURL, CURR, CURU, C-CURL, C-CURR, C-END,
  197.    C-HOME, C-PGDN, C-PGUP, DEL, END, ENTER, ESC, F1, F2, F3, F4,
  198.    F5, F6, F7, F8, F9, F10, F11, F12, HOME, INS, PGDN, PGUP,
  199.    SPACE, S-TAB, TAB
  200.  
  201. [Shifted keys have a "S-" prefix, control keys have a "C-" prefix and Alt keys 
  202. have a "A-" prefix.] 
  203.  
  204. If you want to define another key, you can define a synonym, as in: 
  205.  
  206.    RX S_F7='005A'x; C_A='01'x
  207.  
  208. The variable name is the key name, with an "_" instead of a "-", as you can't 
  209. use "-" in a REXX variable name, and the key name value is the hexadecimal 
  210. value returned by the getKey function.  You can use the following CmdShl 
  211. command to find this value for a key: 
  212.  
  213.    RX call getkey; say "'"substr(ckey,2)"'x"
  214.  
  215. Keys values 
  216.  
  217. The following internal actions are available: 
  218.  
  219.    backsp, cdown, cleft, cright, ctrlend, ctrlhome, ctrlleft,
  220.    ctrlright, cup, del, end, enter, esc, f1, home, ins, tab,
  221.    backtab, space
  222.  
  223. If you assign an internal action to a key, this key will act just like if the 
  224. action key was used.  (All internal actions names are quite self-explanatory, 
  225. except maybe "space", which is used to check the command validity -- that is, 
  226. if the first word of the current edited line is neither a valid path, alias, 
  227. internal command and is not in the current PATH, it will be highlighted.) 
  228.  
  229. For example, if you want the C_A key to act as the Home key (if you're used to 
  230. EMACS), use: 
  231.  
  232.    DEFINE C-A home
  233.  
  234. And, if you don't like the command validity check, use: 
  235.  
  236.    DEFINE SPACE
  237.  
  238. [That is, restore default behavior -- you can use "DEFINE SPACE space" to undo 
  239. your change.] 
  240.  
  241. If you want to assign a static text to a key, use the TEXT command: 
  242.  
  243.    DEFINE A_F10 TEXT Hello World!
  244.  
  245. If you want to assign an immediate command, use the OSNowait statement.  It can 
  246. be followed by any CmdShl valid command(s): 
  247.  
  248.    DEFINE F3 OSNowait EXIT
  249.  
  250. Now, if you hit F3, your session will be closed. 
  251.  
  252. [See PROFILE1.SHL for more complex keys definitions.] 
  253.  
  254.  
  255. ΓòÉΓòÉΓòÉ 1.5.3. QUIT ΓòÉΓòÉΓòÉ
  256.  
  257. The QUIT command is used to exit from CmdShl.  It does not close the underlying 
  258. CMD.EXE session. 
  259.  
  260. QUIT ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  261.  
  262.  
  263. ΓòÉΓòÉΓòÉ 1.5.4. RX ΓòÉΓòÉΓòÉ
  264.  
  265. RX is CmdShl's backdoor.  You can use any valid REXX statement as a parameter, 
  266. and you can check/set CmdShl internal variables, or call CmdShl internal 
  267. functions.  Its useful, but it's mostly for "power users" :-) 
  268.  
  269. RX ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇstatementΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  270.  
  271. [See PROFILE1.SHL for some RX usage samples.] 
  272.  
  273.  
  274. ΓòÉΓòÉΓòÉ 1.5.5. CD ΓòÉΓòÉΓòÉ
  275.  
  276. The CD command now accepts a new parameter, "-", and uses the CDPATH 
  277. environment variable.  Additionaly, both "\" and "/" can be used in directories 
  278. specifications and the drive is changed. 
  279.  
  280. CD ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  281.                            Γö£ΓöÇΓöÇdirectoryΓöÇΓöÇΓöñ
  282.                            ΓööΓöÇΓöÇΓöÇΓöÇΓöÇ - ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  283.  
  284. The CDPATH environment variable contains a list of paths.  You don't have to 
  285. include the current (".") directory in it.  It is always looked up first. 
  286.  
  287. For example, if CDPATH is defined as: 
  288.  
  289.   SET CDPATH=C:\;C:\OS2;
  290.  
  291. Issuing the "CD APPS" command will bring you to "C:\OS2\APPS" (if there was no 
  292. APPS entry in the then-current directory). 
  293.  
  294. WarningIf you want to switch to a directory named "-", you'll have to enclose 
  295. it with double quotes or preceed it with ".\" as in: 
  296.  
  297.    CD "-"
  298.    CD .\-
  299.  
  300.  
  301. ΓòÉΓòÉΓòÉ 1.6. Known Limitations ΓòÉΓòÉΓòÉ
  302.  
  303. When using CmdShl as a CMD.EXE front-end, interrupting the execution of a 
  304. CMD.EXE internal command abort CmdShl too.  Not much can be done regarding this 
  305. problem except waiting for a new CMD.EXE with a better signal handling... 
  306.  
  307. When using CmdShl as a CMD.EXE front-end with OS/2 2.x, your command-line 
  308. window may not close upon shutdown.  THIS PROBLEM NO LONGER OCCURS WITH WARP. 
  309.  
  310. Alias names ARE case-sensitive.  This is intentional but if you don't like it 
  311. that way, please, let me know! 
  312.  
  313. If you want to switch to a directory named "-", you'll have to enclose it with 
  314. double quotes or preceed it with ".\" as in: 
  315.  
  316.    CD "-"
  317.    CD .\-
  318.  
  319. When using the FOR command, use two "%" sign, as in: 
  320.  
  321.    FOR %%n IN (foo bar) DO ECHO %%n
  322.  
  323. A directory name takes the precedence over an executable name with no 
  324. arguments.  That is, if "foo" is a subdirectory of the current directory and 
  325. there also exists a "foo.exe" somewhere along the PATH, issuing the "foo" 
  326. command will change the current directory.  If you want to call "foo.exe", 
  327. either use some arguments, or specify the file's extension, as in: 
  328.  
  329.    foo bar
  330.    foo.exe
  331.  
  332. CmdShl aliases and so-called "internal commands" (i.e., ALIAS, RX, QUIT and 
  333. DEFine) can not be used in subexpressions.  That is, in: 
  334.  
  335.    for %%i in (foo bar) do alias do_%i=baz %i
  336. or 
  337.  
  338.    (foo prj & bar prj) >foobar.log
  339.  
  340. CmdShl's ALIAS command is not called in the first statement, and foo and bar 
  341. cannot be aliases. 
  342.  
  343.  
  344. ΓòÉΓòÉΓòÉ 1.7. Related Files ΓòÉΓòÉΓòÉ
  345.  
  346. cdir.cmd 
  347.  
  348. This filter puts colo[u]rs in your "dir" outputs.  It can be used in an alias: 
  349.  
  350.    alias dir=dir %* | cdir
  351.  
  352. df.cmd [drive ...] 
  353.  
  354. This is a unix "df" clone.  It displays all available (or specified) drives, 
  355. with their total, used and free capacity. 
  356.  
  357. pushd.cmd [new dir] 
  358.  
  359. This command pushes the current directory in a "directory stack", and 
  360. (optionally) changes to the given disk/directory. 
  361.  
  362. popd.cmd 
  363.  
  364. This command pops the head of the directory stack, and go to this new 
  365. directory. 
  366.  
  367.  
  368. ΓòÉΓòÉΓòÉ 1.8. National Language Support ΓòÉΓòÉΓòÉ
  369.  
  370. There's just four language-dependent messages which are not automatically 
  371. adjusted:  it's the alias command help string (aliasHelp), the CmdShl help 
  372. string (cmdHelp), the define command help string (defHelp) and the additional 
  373. CD help string (cdHelp).  It's at the beginning of the file, and you can 
  374. translate it.  Or, even better, you can define them in your PROFILE.SHL (see 
  375. below). 
  376.  
  377. All other language-dependent messages are automatically adjusted by CmdShl 
  378. (secondary prompt, top of screen help string, ...). 
  379.  
  380.  
  381. ΓòÉΓòÉΓòÉ 1.9. Profile Support ΓòÉΓòÉΓòÉ
  382.  
  383. CmdShl supports profile files.  By default, PROFILE.SHL is used, but you can 
  384. override it via the /P switch. 
  385.  
  386. If present, the profile file should be somewhere along the DPATH, or you can 
  387. alternatively specify its complete path. 
  388.  
  389. A profile file is a plain REXX file.  It's called after command line arguments, 
  390. but before any user interaction.  It's usually used to redefine keys 
  391. assignments, displaying or setting some session- dependant data, and so on... 
  392.  
  393. Please refer to PROFILE1.SHL for more explanations. 
  394.  
  395.  
  396. ΓòÉΓòÉΓòÉ 1.9.1. PROFILE1.SHL ΓòÉΓòÉΓòÉ
  397.  
  398. This is a sample profile file for CmdShl.  [Hint: for better startup 
  399. performances, you can remove all comments -- that is, all except the first.] 
  400.  
  401. /* profile.shl - Emacs bindings                                960202 */
  402.  
  403.  
  404. /* This profile file demonstrates typical profile usage:              */
  405. /*                                                                    */
  406. /*       - simulating another product, by defining new keys           */
  407. /*         [The emacs-like C-A, C-E, C-B, C-F, C-N keys]              */
  408. /*                                                                    */
  409. /*       - Improving/tailoring existing commands, adding shortcuts    */
  410. /*         [The auto-close '(', the insert-date key (F8), and S-F7,   */
  411. /*         which displays all possible filenames.]                    */
  412. /*                                                                    */
  413. /*       - Adding new functions                                       */
  414. /*         [The persistent command history, F2 (save), F5 (load) and  */
  415. /*         F7 (name).]                                                */
  416. /*                                                                    */
  417. /*       - National Language Support                                  */
  418. /*         [on-line messages in French.]                              */
  419.  
  420.  
  421. /* In a profile file, you can use any REXX instruction, but, due to   */
  422. /* the current implementation, it must fit in one line.               */
  423. /*                                                                    */
  424. /* That is, you can use:                                              */
  425. /*                                                                    */
  426. /*     if foo = 'XYZZY' then say 'Nothing happens'; else  x = x + 1   */
  427. /*                                                                    */
  428. /* But you can't use:                                                 */
  429. /*                                                                    */
  430. /*     if foo = 'XYZZY' then                                          */
  431. /*        say 'Twice as much happens'                                 */
  432. /*     else                                                           */
  433. /*        x = x + 1                                                   */
  434. /*                                                                    */
  435. /* Alternatively, you can use the comma as a line continuation marker */
  436. /*                                                                    */
  437. /*     foo = 'Hello',                                                 */
  438. /*           'world'                                                  */
  439. /*                                                                    */
  440. /* Another important difference with standard REXX scripts is that    */
  441. /* you cannot call CmdShl commands in a REXX structure using the      */
  442. /* standard way.  You have to use the eval function.  That is,        */
  443. /*                                                                    */
  444. /*     if answer = 'YES' then                                         */
  445. /*        'DEFINE F12 OSNOWAIT shutdown'                              */
  446. /*     else                                                           */
  447. /*        'DEFINE F12 TEXT shutdown'                                  */
  448. /*                                                                    */
  449. /* does not work.  You have to use:                                   */
  450. /*                                                                    */
  451. /*     if answer = 'YES' then                                         */
  452. /*        call eval 'DEFINE F12 OSNOWAIT shutdown'                    */
  453. /*     else                                                           */
  454. /*        call eval 'DEFINE F12 TEXT shutdown'                        */
  455. /*                                                                    */
  456. /* [But it works just fine outside of a structure.]                   */
  457.  
  458.  
  459. /* Note: when a command name is in mixed case, like DEFine below, it  */
  460. /*       means that you can use DEF, DEFI, DEFIN or DEFINE.           */
  461.  
  462. /*                                                                    */
  463. /* There's currently only one "pseudo" command, DEFine, which is most */
  464. /* useful in profile file. Its syntax is as follows:                  */
  465. /*                                                                    */
  466. /*     DEFine key value                                               */
  467. /*                                                                    */
  468. /* Key is a user-defined key or a predefined one:                     */
  469. /*                                                                    */
  470. /*     A-F10, BKSP, CURD, CURL, CURR, CURU, C-CURL, C-CURR, C-END,    */
  471. /*     C-HOME, C-PGDN, C-PGUP, DEL, END, ENTER, ESC, F1, F2, F3, F4,  */
  472. /*     F5, F6, F7, F8, F9, F10, F11, F12, HOME, INS, PGDN, PGUP,      */
  473. /*     SPACE, S-TAB, TAB                                              */
  474. /*                                                                    */
  475. /*     [Shifted keys have a "S-" prefix, control keys have a "C-"     */
  476. /*      prefix and Alt keys have a "A-" prefix.]                      */
  477. /*                                                                    */
  478. /* and value is an internal key name or TEXT nnn or OSNowait nnn:     */
  479. /*                                                                    */
  480. /*     backsp, cdown, cleft, cright, ctrlend, ctrlhome, ctrlleft,     */
  481. /*     ctrlright, cup, del, end, enter, esc, f1, home, ins, tab,      */
  482. /*     backtab, space                                                 */
  483. /*                                                                    */
  484. /*     TEXT nnn simulates the keyboard entry of nnn                   */
  485. /*                                                                    */
  486. /*     OSNowait cmd executes cmd (via the CmdShl interpretor)         */
  487. /*                                                                    */
  488. /* All other "pseudo" commands are executed via CmdShl's interpretor. */
  489.  
  490. /* [In fact, the DEFine command could have been implemented as an     */
  491. /*  alias:                                                            */
  492. /*                                                                    */
  493. /*     ALIAS DEFINE=RX _args="%*";                                    */
  494. /*                     parse value _args with key rest;               */
  495. /*                     if length(key) > 1 then                        */
  496. /*                        key = value(translate(key,'_','-'));        */
  497. /*                     if rest \= '' then                             */
  498. /*                        call value "key._"c2x(key), rest;           */
  499. /*                     else interpret "drop key._"c2x(key)'           */
  500. /*                                                                    */
  501. /*  It's functionnaly equivalent.]                                    */
  502.  
  503. /* user-defined key name - note the usage of "_" in place of "-" in   */
  504. /*                         the key name (you can't use "-" in a REXX  */
  505. /*                         variable name).                            */
  506. /*                                                                    */
  507. /*                         The value of a key name is the hexadecimal */
  508. /*                         value returned by the getKey function when */
  509. /*                         pressing it (you can use the following     */
  510. /*                         CmdShl command to find it) :               */
  511. /*                                                                    */
  512. /*                         RX call getkey; say "'"substr(ckey,2)"'x"  */
  513.  
  514. /* Note: by default, variables are hidden when inside a getLine call. */
  515. /*       If you want to expose some of them, add them to the global   */
  516. /*       variable -- global = global "newname1 newname2"              */
  517. /*                                                                    */
  518. /*       So, each time you use one of your variable in the right hand */
  519. /*       side of a DEFine command, you have to expose it.             */
  520.  
  521.  
  522. C_A = '01'x; C_B = '02'x; C_E = '05'x; C_F = '06'x; C_N = '0E'x;
  523. S_F7 = '005A'x
  524.  
  525.  
  526. /* defining key value - a shifted key can use "-" or "_" in its name  */
  527. 'DEFINE C-A home'
  528. 'DEFINE C-B left'
  529. 'DEFINE C-F right'
  530. 'DEFINE C-E end'
  531. 'DEFINE C-N cdown'
  532.  
  533. 'DEFINE F3 OSNOWAIT EXIT'
  534.  
  535.  
  536. /* you can even do complex things:                                    */
  537. 'DEFINE (  OSNOWAIT RX line = insert("()",line,currOfs); currOfs = currOfs+1'
  538.  
  539. 'DEFINE F8 OSNOWAIT RX line = insert(date(),line,currOfs); currOfs = currOfs+length(date())'
  540.  
  541. 'DEFINE S-F7 osn rx if currTab \= 0 then do; say; do i = 1 to tree.0; say tree.i; end; call charout, print(); oline=""; parse value SysCurPos() with origRow origCol .; key="tab"; end'
  542.  
  543.  
  544. /* we can even add a new feature: loading/saving commands history     */
  545.  
  546. /* first, we define a file name (and make it public, F7 requires it): */
  547. history = 'd:\tmp\history.shl'; global = global 'history'
  548.  
  549. /* then, an alias, LOADHIST, which loads the commands history         */
  550. 'ALIAS LOADHIST=RX drop prevLine.; i = 0; do while lines(history); i = i+1; prevLine.i = linein(history); end; prevLine.0 = i; call stream history, "c", "close"'
  551.  
  552. /* now, we define three function keys, F2 (save), F5 (load/refresh)   */
  553. /* and F7 (name)                                                      */
  554. 'DEFINE F2 OSNOWAIT RX "@del /f" history; do i = 1 to prevLine.0; call lineout history, prevLine.i; end; call stream history, "c", "close"'
  555. 'DEFINE F5 OSNOWAIT LOADHIST'
  556. 'DEFINE F7 OSNOWAIT RX call charout ,"1b"x"[s"||"1b"x"[0;0H"||"1b"x"[1;37;42m"||"1b"x"[KNew history name: "; history=getLine(history); call charout ,"1b"x"[0;0H"||"1b"x"[1;37;44m"||"1b"x"[K"helpstring"1b"x"[0m"||"1b"x"[u"'
  557.  
  558. /* finally, we load the default history                               */
  559. 'LOADHIST'
  560.  
  561.  
  562. /* Here, we redefine help messages in French...                       */
  563.  
  564. defHelp = "Utilisez la command DEFINE pour (re)d╨Æfinir le r╨úle des touches"nl||,
  565.           "du clavier"nl||nl||,
  566.           "SYNTAXE:    DEF touche [valeur]"nl||,
  567.           "         DEFINE touche [valeur]"nl||nl||,
  568.           "          touche  Sp╨Æcifie le nom de la touche ╨ò d╨Æfinir"nl||,
  569.           "          value   Valeur affect╨Æe ╨ò la touche. Ce peut ╨ÿtre une"nl||,
  570.           "                  commande interne, OSNowait xxx ou TEXT yyy."nl||nl||,
  571.           "Exemples:"nl||,
  572.           "          DEF F12 TEXT dir /w"nl||,
  573.           "       DEFINE F3  OSNOWAIT exit"nl||,
  574.           "          DEF F12"
  575. aliasHelp = "Utilisez la commande ALIAS pour afficher, d╨Æfinir ou"nl||,
  576.             "supprimer un alias"nl||nl||,
  577.             "SYNTAXE: ALIAS [LIST|alias=[cha╨£ne]|@fichier]"nl||nl||,
  578.             "          LIST     Affiche la liste des alias en cours."nl||,
  579.             "          alias    Sp╨Æcifie le nom de l'alias."nl||,
  580.             "          cha╨£ne   Valeur alphanum╨Ærique affect╨Æe ╨ò l'alias."nl||,
  581.             "          fichier  Nom d'un fichier contenant un ensemble de"nl||,
  582.             "                   d╨Æfinitions d'alias."nl||nl||,
  583.             "Dans la d╨Æfinition d'un alias, %n[*] correspond aux param╨Ütres"nl||, "pass╨Æs sur la ligne de commande."
  584. cmdHelp = "Utilisez la commande CMDSHL pour augmenter les capacit╨Æs de"nl||,
  585.           "votre interpr╨Üteur de commande"nl||nl||,
  586.           "SYNTAXE: CMDSHL [/I|/O] [/P profile] [/C cmd|/K cmd]"nl||nl||,
  587.           "          /I    S╨Ælecte le mode Insertion par d╨Æfaut."nl||,
  588.           "          /O    S╨Ælecte le mode surfrappe par d╨Æfaut."nl||,
  589.           "          /P    Utilise le fichier profile sp╨Æcifi╨Æ."nl||,
  590.           "          /C    Ex╨Æcute la commande cmd et met fin ╨ò l'ex╨Æcution"nl||,
  591.           "                de CMDSHL."nl||,
  592.           "          /K    Ex╨Æcute la commande cmd sans mettre fin ╨ò l'ex╨Æcution"nl||,
  593.           "                de CMDSHL."nl||nl||,
  594.           "Par d╨Æfaut, le mode Insertion est actif et le fichier PROFILE.SHL"nl||,
  595.           "est utilis╨Æ comme profile s'il existe sur le chemin sp╨Æcifi╨Æ par"nl||,
  596.           "la variable d'environnement DPATH."
  597. cdHelp = "Tapez CD -        Pour retourner au r╨Æpertoire pr╨Æc╨Ædent."
  598.  
  599.  
  600. ΓòÉΓòÉΓòÉ 1.10. CmdShl Internal functions ΓòÉΓòÉΓòÉ
  601.  
  602. This section describes useful CmdShl internal functions.  Please note that 
  603. theses functions may evolve in future releases. 
  604.  
  605. addAlias("alias=[cmd]") 
  606.  
  607. The addAlias command adds (or removes) an alias to (from) the alias database. 
  608.  
  609. No return value. 
  610.  
  611. Examples 
  612.  
  613.    call addAlias "foo=cd e:2_X/unix/emacs19.29/info/beta"
  614.    call addAlias "foo=cd d:/local"
  615.    call addAlias "foo="
  616.  
  617. eval(line [,current]) 
  618.  
  619. The eval command evaluate its line argument.  The optional current parameter is 
  620. here to prevent recursive execution of aliases (current is a space-delimited 
  621. list of alias names). 
  622.  
  623. Returns 0 if it evaluates the QUIT command, 1 otherwise. 
  624.  
  625. Examples 
  626.  
  627.    call eval "FOO"                  If FOO is an alias or an
  628.                                     external command, it's
  629.                                     executed.
  630.  
  631.    call eval "FOO", "FOO"           If FOO is an external command,
  632.                                     it's executed.  Error SYS1041
  633.                                     occurs otherwise.
  634.  
  635.    call eval "FOO & BAR", "ZOO BAZ" FOO and BAR will be executed in
  636.                                     sequence.  If they are alias,
  637.                                     and if they call ZOO or BAR
  638.                                     (either directly or
  639.                                     indirectly), it's the external
  640.                                     command ZOO or BAR which will
  641.                                     be used.
  642.  
  643. expand(string) 
  644.  
  645. The expand function returns string where all occurrences of environment 
  646. variables surrounded by '%' are substituted by their values. 
  647.  
  648. Examples 
  649.  
  650.    say expand('%tmp%\foo')        --> 'E:\IBMCPP\TMP\foo'
  651.    say expand('%unknown%')        --> '%unknown%'
  652.    say expand('%unknown%tmp%')    --> '%unknownE:\IBMCPP\TMP'
  653.    say expand('100%')             --> '100%'
  654.  
  655. getFileSpec(cmd) 
  656.  
  657. The getFileSpec function returns the (possibly) partial file name ending cmd. 
  658.  
  659. Examples 
  660.  
  661.    say getFileSpec('dir c:\os2\dl')     -->    c:\os2\dl
  662.    say getFileSpec('dir "My Desktop"')   -->    "My Desktop"
  663.  
  664. getKey() 
  665.  
  666. This function reads a key from the keyboard, and returns its value, as defined 
  667. by the DEFine command.  If the key has not been DEFined, the key itself is 
  668. returned. 
  669.  
  670. As a side effect, the ckey value is set to the internal representation of the 
  671. key (a "_" followed by 2 to 4 hexadecimal digits). 
  672.  
  673. Examples 
  674.  
  675.    say getKey()      --> F3      --> OSNOWAIT EXIT  (ckey is _003D)
  676.    say getKey()      --> a       --> a              (ckey is _61)
  677.  
  678. getLine([line]) 
  679.  
  680. This function reads an entry from the user, and returns it.  It can be a 
  681. multi-line entry.  All currently defined editing keys can be used.  If line is 
  682. specified, it's the default value. 
  683.  
  684. Warning: getLine can be used recursively, but the command history is shared 
  685. among all calls. 
  686.  
  687. print() 
  688.  
  689. This function returns the string corresponding to the current prompt (as 
  690. defined by the PROMPT environment variable, if any).  It can then be displayed 
  691. by charout. 
  692.  
  693. Example 
  694.  
  695.    call charout, print()
  696.  
  697. profile() 
  698.  
  699. This procedure read a profile file from disk, and interpret it. The real file 
  700. name is derived from the profileName variable (if it's not an absolute path, it 
  701. is searched via DPATH). 
  702.  
  703. No return value. 
  704.  
  705. [This procedure can be used to execute 'enhanced' command scripts, that is, 
  706. command script calling CmdShl-specific commands -- but keep in mind that CmdShl 
  707. profiles suffer some syntax restrictions.] 
  708.  
  709. Examples 
  710.  
  711.    profileName = 'D:\tmp\foo.cmd'; call profile
  712.    'ALIAS EXEC=RX profileName = SysSearchPath('PATH',"%*"); call profile'
  713.  
  714. substitute(line, arg) 
  715.  
  716. This function returns line, where all occurrences of %* (if any) have been 
  717. replaced with arg. 
  718.  
  719. Examples 
  720.  
  721.    say substitute("bla bla", "xxx")       --> bla bla
  722.    say substitute("it's %* (%*)", "yyy")  --> it's yyy (yyy)
  723.  
  724.  
  725. ΓòÉΓòÉΓòÉ 1.11. CmdShl Internal variables ΓòÉΓòÉΓòÉ
  726.  
  727. This section describes useful CmdShl internal variables.  Please note that 
  728. theses variables may evolve in future releases. 
  729.  
  730. aliasHelp [string] 
  731.  
  732. What to display when the 'ALIAS /?'  command is issued.  You can translate this 
  733. message (the recommended place to do so is in your PROFILE.SHL). 
  734.  
  735. aliasNames [string] 
  736.  
  737. A space-delimited list of name (case is sensitive) which enumerates all defined 
  738. aliases.  This list is maintained automatically by the ALIAS command, but you 
  739. can use it to check the existence of an alias, or ... 
  740.  
  741. Example 
  742.  
  743.    'ALIAS EXISTS?=RX if wordpos('%*',aliasNames) > 0 then say YES;
  744.                                                      else say NO'
  745.  
  746. cdHelp [string] 
  747.  
  748. What to display in addition to the default 'CD /?'  output (in fact, a 
  749. description of the 'CD -' command).  You can translate this message (the 
  750. recommended place to do so is in your PROFILE.SHL) 
  751.  
  752. cmdHelp [string] 
  753.  
  754. What to display when the 'CMDSHL /?'  command is issued.  You can translate 
  755. this message (the recommended place to do so is in your PROFILE.SHL). 
  756.  
  757. cmdList [string] 
  758.  
  759. The list of all internal command interpretor commands, in uppercase (that is, 
  760. CD, DIR, etc.).  Used when command validation is enabled. 
  761.  
  762. cmdQueue [0|1] 
  763.  
  764. The history-list behavior.  Can be 0 or 1 (the default).  If cmdQueue is 1, a 
  765. recalled command is moved to the end of the history list; otherwise, it remains 
  766. in place. 
  767.  
  768. [the default behavior mimics the CMD.EXE behavior.] 
  769.  
  770. defHelp [string] 
  771.  
  772. What to display when the 'DEFine /?'  command is issued.  You can translate 
  773. this message (the recommended place to do so is in your PROFILE.SHL). 
  774.  
  775. fileSeparator [string] 
  776.  
  777. When trying to find a file name, where to stop.  Used by filename completion. 
  778. Its value is ' =;<>|()' by default. 
  779.  
  780. helpColor1, helpColor2 [strings] 
  781.  
  782. helpColor1 contains the ANSI escape sequence to use at the beginning of the 
  783. (optional) top line help string, and helpColor2 contains the ANSI escape 
  784. sequence to use at the end of this string. Theses two strings should not move 
  785. the cursor or ...  They should only change the color attribute.  Their default 
  786. values is: 
  787.  
  788.    helpColor1='1b'x'[34;47m'    -- blue on white background
  789.    helpColor2='1b'x'[0m'        -- default color
  790.  
  791. impCD [0|1] 
  792.  
  793. The "implied CD" (aka "executable" directories) state (1 by default, can be 
  794. overridden in your PROFILE.SHL). 
  795.  
  796. insertMode [two numbers] 
  797.  
  798. How to display the cursor in insert mode (by default, '-80 -90', ie a low bar). 
  799. This setting is only used if REXXVIO is present. 
  800.  
  801. insertState [0|1] 
  802.  
  803. The default insertion state (1 by default, can be overridden via CmdShl's /O 
  804. switch).  Each time you start to edit a new command, the insertion state is 
  805. reset to insertState value (when editing a command, you can change the 
  806. insertion state by using the Ins key -- by default, but theses changes are 
  807. local). 
  808.  
  809. invalidCmd [string] 
  810.  
  811. What to interpret when an invalid command is found on the command line.  In 
  812. addition to the usual editing variables, xlen contains the position of the 
  813. first symbol of the offending command and xline is the offending command. 
  814. invalidCmd default's value is 
  815.  
  816.    invalidCmd = "call SysCurPos origRow + xlen % col, xlen // col;",
  817.                 "call charout 'STDOUT:', '1b'x'[1;31m'||xline'1b'x'[0m';",
  818.                 "xOfs = currOfs + 1"
  819.  
  820. [That is, it displays the offending command in red.] 
  821.  
  822. oldDir [string] 
  823.  
  824. The previously visited directory.  This variable is maintained by CmdShl's CD 
  825. command. 
  826.  
  827. overwriteMode [two numbers] 
  828.  
  829. How to display the cursor in overwrite mode (by default, '0 -90', ie a blinking 
  830. box).  This setting is only used if REXXVIO is present. 
  831.  
  832. prevLine. [stem] 
  833.  
  834. The commands history list.  prevLine.0 contains the history size. 
  835.  
  836. profileName [string] 
  837.  
  838. The file name to be used by the profile() internal command. 
  839.  
  840. shlList [string] 
  841.  
  842. The list of enabled CmdShl internal commands (in uppercase).  Used when command 
  843. validation is enabled. 
  844.  
  845. vioPresent [0|1] 
  846.  
  847. 1 if REXXVIO was detected at load time, 0 otherwise. 
  848.  
  849.  
  850. ΓòÉΓòÉΓòÉ 1.12. CmdShl Editing variables ΓòÉΓòÉΓòÉ
  851.  
  852. This section describes the variables which can be used while editing a command 
  853. (that is, only usable when used in a key definition). 
  854.  
  855. currOfs [number] 
  856.  
  857. The current cursor position in the command (first char is at currOfs 1). 
  858.  
  859. currTab [number] 
  860.  
  861. If not null, we are in filename completion mode.  If null, we're not (or, no 
  862. longer).  The "tab" internal key name enters completion mode.  ALL OTHER keys 
  863. exits completion mode.  If you want to remain in completion mode after having 
  864. used another key, add the following code after your key definition: 
  865.  
  866.    key = "tab"
  867.  
  868. key [string] 
  869.  
  870. The internal key name being executed (see currTab for an important note). 
  871.  
  872. line [string] 
  873.  
  874. The line being edited. 
  875.  
  876. oline [string] 
  877.  
  878. The edited line before its last modification. 
  879.  
  880. tree. [stem] 
  881.  
  882. If tree.0 is not null, the stem contains the matching file names. 
  883.  
  884.  
  885. ΓòÉΓòÉΓòÉ 2. Filelist User's Guide ΓòÉΓòÉΓòÉ
  886.  
  887.      What's That? 
  888.      Starting Filelist 
  889.      Screen Description 
  890.      Available Commands 
  891.      Profile Support 
  892.      Prerequistes 
  893.  
  894.  
  895. ΓòÉΓòÉΓòÉ 2.1. What's That? ΓòÉΓòÉΓòÉ
  896.  
  897. Fl is yet another character-mode directory browser.  It's just a REXX script, 
  898. but it's nonetheless very easy to use.  You just have to "annotate" the files 
  899. you want to apply a command to with the desired command. 
  900.  
  901. Suppose you want to print the 8514.RC file.  Just move the cursor over the 
  902. corresponding line, and enter "PRINT" (without quotes!).  The command will 
  903. appear in the prefix command (the area filled with "="s). You will have to 
  904. press the Enter key to execute it (in fact, the Enter key executes all pending 
  905. commands -- that is, you can prepare more than one command, and execute them in 
  906. one step.) 
  907.  
  908. If, in the previous example, you've wanted to print out the 8514.RC file while 
  909. renaming ATTRIB.EXE to, say, SETATTR.EXE, you would have had to enter the 
  910. "PRINT" command over the 8514.RC line and the "REN / SETATTR.EXE" one over the 
  911. ATTRIB.EXE line.  And then, pressing the Enter key in the main screen area 
  912. would have executed theses two commands sequentially (that is, from top to 
  913. bottom). 
  914.  
  915. You can also use (and redefine) function keys to execute frequently used 
  916. commands (such as browsing a file, or copying it to another disk...). 
  917.  
  918. All colors and keys are redefinable.  If you like the XEDIT look, you can use 
  919. the provided PROFILE.FL: 
  920.  
  921. You can open more than one directory at a time, sort them, or use a restricted 
  922. view (eg, *.EXE and *.CMD files only). 
  923.  
  924.  
  925. ΓòÉΓòÉΓòÉ 2.2. Starting Filelist ΓòÉΓòÉΓòÉ
  926.  
  927. Syntax 
  928.  
  929.    fl [filespec] [([tree|sort[d|a] name|ext|size|date [...]]]
  930.  
  931. Parameters 
  932.  
  933.    (Noprofile        -  Do not use a profile file;
  934.    (Profile file     -  Use the specified profile file;
  935.    (Sort[d|a] opt    -  Sort the entries by opt;
  936.    (Wide             -  Display more than one file per line.
  937.  
  938. Examples 
  939.  
  940.    fl c:\os2 (sort name
  941.    fl *.cmd
  942.    fl
  943.  
  944.  
  945. ΓòÉΓòÉΓòÉ 2.3. Screen Description ΓòÉΓòÉΓòÉ
  946.  
  947. The Fl screen is composed of four parts.  The first line is the info area.  It 
  948. is followed by the main area.  The penultimate line is the command area, while 
  949. the last line is the key/message area. 
  950.  
  951. The Info Area 
  952.  
  953. It contains the directory name, the available space in the corresponding disk, 
  954. and the current file # and file count. 
  955.  
  956. The Main Area 
  957.  
  958. This area is composed of two sub-areas.  The first one is the prefix area. 
  959. It's by default filled with "="s.  You can replace them with line number, by 
  960. issuing the "SET NUM ON" command in the command area.  The second one contains 
  961. the file's informations; that is, file date, file time, file size and file 
  962. name. 
  963.  
  964. The Command Area 
  965.  
  966. Use this area to enter non-file related commands (such as, say, PSTAT, SET NUM 
  967. ...  or RESET PREFIX).  The number surrounded by square brackets is the current 
  968. view number (1 for the first opened directory, 2 for the second, ...). 
  969.  
  970. The Key/Message Area 
  971.  
  972. This area usually displays function keys labels.  If an error occurs, it will 
  973. temporarily display an error message. 
  974.  
  975.  
  976. ΓòÉΓòÉΓòÉ 2.4. Available Commands ΓòÉΓòÉΓòÉ
  977.  
  978. When entering commands in the main area, you can use the following shortcuts: 
  979.  
  980.    /     =     The whole file name (drive+path+name+ext);
  981.    /n    =     The file name;
  982.    /e,/t =     The file extension (or "type");
  983.    /p    =     The file path;
  984.    /d,/m =     The file drive (or "mode");
  985.    /o    =     Nothing;
  986.    //    =     A "/" symbol.
  987.  
  988. If you enter a main area command without at least one of the above shortcuts, 
  989. the complete file name will be added at the end of the command (so, use the 
  990. "/o" shortcut if you do not want to pass the file name to the command). 
  991.  
  992. For command area commands, these shortcuts refer to the current file. 
  993. Additionally, the complete file name is NOT appended by default. 
  994.  
  995. The following commands are also available in addition to all standard internal 
  996. or external commands: 
  997.  
  998.    BAckward [n|*]
  999.    BOTtom
  1000.    CCancel
  1001.    DEFine keyname [command [args]]
  1002.    DOS [command]
  1003.    DOSNowait command
  1004.    Down [n|*]
  1005.    FList [dir name]
  1006.    FOrward [n]
  1007.    HELP
  1008.    Next [n|*]
  1009.    NEXTWindow
  1010.    OS [command]
  1011.    OSNowait command
  1012.    QUIT
  1013.    RESet ALL|PREfix
  1014.    RUN [command]
  1015.    SET CASE Mixed|Upper|Lower
  1016.    SET COLO[U]R [modifier [...]] [foreground [background]]
  1017.    SET CURLine M[+n|-n]|[+|-]n
  1018.    SET IMPcmscp ON|OFF
  1019.    SET IMPOS ON|OFF
  1020.    SET MSGLine ON [M[+n|-n]|[+|-]n]
  1021.    SET NUM ON|OFF
  1022.    SHOWkey
  1023.    SOS DELBAck
  1024.    SOS DELChar
  1025.    SOS STARTENDChar
  1026.    SOS UNDO
  1027.    TEXT text
  1028.    TOP
  1029.    Up n|*
  1030.    Xedit
  1031.  
  1032.    <Not completed yet :-) >
  1033.  
  1034.  
  1035. ΓòÉΓòÉΓòÉ 2.5. Profile Support ΓòÉΓòÉΓòÉ
  1036.  
  1037. Fl supports profile files.  By default, PROFILE.FL is used, but you can 
  1038. override it via the (Profile switch.  If you don't want to use a profile, use 
  1039. the (Noprofile switch. 
  1040.  
  1041. If present, the profile file should be somewhere along the DPATH, or you can 
  1042. alternatively specify its complete path. 
  1043.  
  1044. A profile file is a plain REXX file.  It's called before any user interaction. 
  1045. It's usually used to redefine keys assignments or colo[u]rs, displaying or 
  1046. setting some session-dependant data, and so on... 
  1047.  
  1048.  
  1049. ΓòÉΓòÉΓòÉ 2.6. Prerequisite ΓòÉΓòÉΓòÉ
  1050.  
  1051. Fl requires REXXVIO, a free text-mode library for REXX. 
  1052.  
  1053. It's a good idea to register this DLL.  That is, you may want to put the 
  1054. following statements in your STARTUP.CMD: 
  1055.  
  1056.    rc = RxFuncAdd("VioLoadFuncs","REXXVIO","VioLoadFuncs")
  1057.    rc = VioLoadFuncs()
  1058.  
  1059.  
  1060. ΓòÉΓòÉΓòÉ 3. Less ΓòÉΓòÉΓòÉ
  1061.  
  1062.  If you're using Object Rexx (the DEVCON 8/9 edition), the "=" command will be 
  1063.  disabled, as well as "external" commands.  The first point is due to a 
  1064.  definition change in the STREAM() built-in function, and will be fixed in a 
  1065.  future release of Less, but the second point is due to a bug in the 
  1066.  LINEIN('CON:') built-in function, and will not be fixed by Less. 
  1067.  
  1068.      What's That? 
  1069.      Starting Less 
  1070.      Commands 
  1071.      Known Limitations 
  1072.  
  1073.  
  1074. ΓòÉΓòÉΓòÉ 3.1. What's That? ΓòÉΓòÉΓòÉ
  1075.  
  1076. Less is a file browser.  When used as a MORE.EXE replacement, it provides much 
  1077. faster displays, the ability to run any program/command and some informations 
  1078. (the elapsed number of lines, mainly). 
  1079.  
  1080. When used as a command, it provides horizontal and vertical scrolling, the 
  1081. ability to locate a text string, to jump to a specified line...  and it can 
  1082. cycles through more than one file. 
  1083.  
  1084. And less.cmd is small (less than 2Kb).  But if you're new to REXX, this command 
  1085. file is not necessarily the best place to start with, though :-) [It's nicely 
  1086. indented - to my taste - but there's not that much comments, and it includes 
  1087. some cryptic statements...] 
  1088.  
  1089.  
  1090. ΓòÉΓòÉΓòÉ 3.2. Starting Less ΓòÉΓòÉΓòÉ
  1091.  
  1092. Syntax 
  1093.  
  1094.    less filename [filename ...]
  1095.    ... | less
  1096.    less <...
  1097.  
  1098. Examples 
  1099.  
  1100.    less *.doc *.txt
  1101.    dir | less
  1102.    less <config.sys
  1103.  
  1104.  
  1105. ΓòÉΓòÉΓòÉ 3.3. Commands ΓòÉΓòÉΓòÉ
  1106.  
  1107. [A "*" following a command name denotes a command which can't be used when 
  1108. less.cmd is called as a filter.] 
  1109.  
  1110.  "<", Left (*) 
  1111.            Scroll right 20 columns. 
  1112.  
  1113.  ">", Right (*) 
  1114.            Scroll left 20 columns. 
  1115.  
  1116.  "N", F12 (*) 
  1117.            Next file in the ring (if available). 
  1118.  
  1119.  "P", F11 (*) 
  1120.            Previous file in the ring (if available). 
  1121.  
  1122.  "." (*) 
  1123.            Redraws the screen. 
  1124.  
  1125.  ESC, F3 
  1126.            Exits less. 
  1127.  
  1128.  ENTER 
  1129.            Scroll down one line. 
  1130.  
  1131.  SPACE, PageDown 
  1132.            Move down one screen. 
  1133.  
  1134.  BACKSPACE, PageUp (*) 
  1135.            Move up one screen. 
  1136.  
  1137.  +nnn (*) 
  1138.  -nnn (*) 
  1139.  nnn (*) 
  1140.            Use this command to move the current (top) line to another one. It 
  1141.            can be used in three ways: 
  1142.  
  1143.                          nnn      Move to line number nnn.
  1144.                          +nnn     Move forward (down) nnn number of lines.
  1145.                          -nnn     Move backward (up) nnn number of lines.
  1146.  
  1147.  "=" 
  1148.            Displays current file informations:  file name, current top line 
  1149.            number, current left column, current position, file size and file 
  1150.            position in the file ring. 
  1151.  
  1152.            Example 
  1153.  
  1154.                          <D:\backup\config.new line=1 col=1 pos=1142/3905 file=1/4>
  1155.  
  1156.  /[searchstring] (*) 
  1157.            Locates the first occurrence of "searchstring" in the current file. 
  1158.            If "searchstring" is empty, locates the next occurrence of the 
  1159.            previously defined searchstring. 
  1160.  
  1161.            The search is case-insensitive. 
  1162.  
  1163.            Examples 
  1164.  
  1165.                       /REM
  1166.  
  1167.            The top-line will be positioned on the first occurrence of 'REM' in 
  1168.            the current file.  If nothing is found, you will get a new less ":" 
  1169.            prompt, as in: 
  1170.  
  1171.                          :/azert
  1172.                          :_
  1173.  
  1174.                       /
  1175.  
  1176.            The top-line will be positioned on the next occurrence of the 
  1177.            previously defined searchstring (REM in our example). 
  1178.  
  1179.            If no next occurrence exists, you will get a new less ":" prompt, as 
  1180.            in: 
  1181.  
  1182.                          :/
  1183.                          :_
  1184.  
  1185.  anything else 
  1186.            Your REXX command is interpreted. 
  1187.  
  1188.            Warning:  When calling a REXX script, you have to precede its name 
  1189.            with "call ". 
  1190.  
  1191.            The following internal variables may be of interest: 
  1192.  
  1193.                          A        the command line arguments
  1194.                          file     the current file name
  1195.                          r        the screen height
  1196.                          c        the screen width
  1197.                          l        the current top-line number
  1198.                          d        the current horizontal delta
  1199.                          n        the current file position in the ring
  1200.                          m        the number of file in the ring
  1201.                          t.i      (where i is in 1..m) the ith file name
  1202.                          s        the current search string
  1203.  
  1204.            Examples 
  1205.  
  1206.            To display the current directory, enter 
  1207.  
  1208.                          dir
  1209.  
  1210.            [If you want to use jokers chars, you will have to use single or 
  1211.            double quotes, as in:  dir '*.cmd'.] 
  1212.  
  1213.            To display the current search string, enter 
  1214.  
  1215.                          say s
  1216.  
  1217.            To edit the currently displayed file with tedit, enter 
  1218.  
  1219.                          call exc close; tedit file
  1220.  
  1221.            and use the "." command to redraw the screen. 
  1222.  
  1223.            [Well, the "call exc close" is not very, er, intuitive, but it is 
  1224.            required in order to prevent a file-sharing violation -- that is, 
  1225.            less is currently reading the file, and so, nobody can change it. 
  1226.            Automatically closing the file may be implemented in a future 
  1227.            release, though...] 
  1228.  
  1229.  
  1230. ΓòÉΓòÉΓòÉ 3.4. Known Limitations ΓòÉΓòÉΓòÉ
  1231.  
  1232. Tabulations are replaced by the symbol "┬╖".  This makes browsing files 
  1233. containing mixed space- and tabulation-based indentations a bit strange. 
  1234.  
  1235. If the browsed file contains ANSI escape-sequences, you may encounter strange 
  1236. results. 
  1237.  
  1238. The locate function is case-insensitive.  It's sometime annoying. 
  1239.  
  1240. It would be nice to be able to use the horizontal scrolling functions while 
  1241. browsing a piped output (that is, when less.cmd is used as a filter).  It would 
  1242. be nice to be able to redraw the current screen, too. 
  1243.  
  1244. >>> All theses limitations can easily be fixed, but the 2Kb figure please me 
  1245. very well, so, I'll try to include them without breaking it...  That 
  1246. unfortunately takes a bit more time :-) 
  1247.  
  1248.  
  1249. ΓòÉΓòÉΓòÉ 4. Query ΓòÉΓòÉΓòÉ
  1250.  
  1251.  Query (as well as this documentation :-) are in a very early beta stage.  Some 
  1252.  features may be buggy (but non destructive) or incompletly implemented. 
  1253.  
  1254.  QUERY is a command used to extract various data.  It is especialy useful if 
  1255.  you are using IBM Global Network as your Internet provider. 
  1256.  
  1257.                           ΓöîΓöÇΓöÇDATEΓöÇΓöÇΓöÉ
  1258.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇTIMEΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1259.   QUERY ΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇCONNECTΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöñ
  1260.           Γö£ΓöÇTHISΓöÇΓöñ Γö£ΓöÇΓöÇΓöÇMONTHΓöÇΓöÇΓöÇΓöñ         Γö£ΓöÇTIMEΓöÇΓöÇΓöñΓööΓöÇFOR user ...ΓöÇΓöÿ
  1261.           ΓööΓöÇLASTΓöÇΓöÿ Γö£ΓöÇΓöÇΓöÇYEARΓöÇΓöÇΓöÇΓöÇΓöñ         ΓööMESSAGEΓöÿ
  1262.                    Γö£ΓöÇΓöÇJANuaryΓöÇΓöÇΓöñ
  1263.                    :           :
  1264.  
  1265.  You may have to increase your Connect.Log size (see the Logging page of your 
  1266.  Dialer's setting notebook) if you want to be able to query connection 
  1267.  statistics for more than one month or two.  (50K looks like a reasonnable 
  1268.  figure as it can hold something like three months of data...) 
  1269.  
  1270.      QUERY TIME
  1271.      QUERY DATE
  1272.      QUERY CONNECT TIME
  1273.      QUERY LAST MONTH'S CONNECT TIME FOR FOOBAR
  1274.      QUERY LAST CONNECT MESSAGE
  1275.      ...
  1276.